<template>
	<div class="clipboard">
		<h1>Clipboard</h1>
	</div>
</template>

<script lang="ts" setup>
import { ref } from "vue";
import { copyText } from "@/util/clipboard";

const text = ref("https://gitee.com/yangxin11010/vue-admin");

function copyInput() {
	copyText(text.value)
		.then(res => {
			console.log(res);
		})
		.catch(e => {
			console.error(e);
		});
}
function copySuccess(e: any) {
	console.log(e);
}
function copyError(e: any) {
	console.error(e);
}
</script>
